"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
console.log('-----3.抽象工厂模式-------');
//抽象产品工厂基类
var AmriCoffe = /** @class */ (function () {
    function AmriCoffe() {
        console.log(' 我是抽象产品工厂基类--AmriCoffe');
    }
    return AmriCoffe;
}());
;
var LatteCoffe = /** @class */ (function () {
    function LatteCoffe() {
        console.log(' 我是抽象产品工厂基类--Latte');
    }
    return LatteCoffe;
}());
;
var FlowerCoffe = /** @class */ (function () {
    function FlowerCoffe() {
        console.log(' 我是抽象产品工厂基类--Flower');
    }
    return FlowerCoffe;
}());
;
//具体产品工厂
var SatrtBuckAmriCoffeFcatory = /** @class */ (function (_super) {
    __extends(SatrtBuckAmriCoffeFcatory, _super);
    function SatrtBuckAmriCoffeFcatory() {
        var _this = _super.call(this) || this;
        console.log(' 我是具体产品工厂--SatrtBuckAmriCoffe');
        return _this;
    }
    return SatrtBuckAmriCoffeFcatory;
}(AmriCoffe));
;
var LuckinAmriCoffeFcatory = /** @class */ (function (_super) {
    __extends(LuckinAmriCoffeFcatory, _super);
    function LuckinAmriCoffeFcatory() {
        var _this = _super.call(this) || this;
        console.log(' 我是具体产品工厂--LuckinAmriCoffe');
        return _this;
    }
    return LuckinAmriCoffeFcatory;
}(AmriCoffe));
;
var SatrtBuckLatteCoffeFcatory = /** @class */ (function (_super) {
    __extends(SatrtBuckLatteCoffeFcatory, _super);
    function SatrtBuckLatteCoffeFcatory() {
        var _this = _super.call(this) || this;
        console.log(' 我是具体产品工厂--SatrtBuckLatte');
        return _this;
    }
    return SatrtBuckLatteCoffeFcatory;
}(LatteCoffe));
;
var LuckinLatteCoffeFcatory = /** @class */ (function (_super) {
    __extends(LuckinLatteCoffeFcatory, _super);
    function LuckinLatteCoffeFcatory() {
        var _this = _super.call(this) || this;
        console.log(' 我是具体产品工厂--LuckinLatte');
        return _this;
    }
    return LuckinLatteCoffeFcatory;
}(LatteCoffe));
;
var SatrtBuckFlowerCoffeFcatory = /** @class */ (function (_super) {
    __extends(SatrtBuckFlowerCoffeFcatory, _super);
    function SatrtBuckFlowerCoffeFcatory() {
        var _this = _super.call(this) || this;
        console.log(' 具体产品工厂--SatrtBuckFlower');
        return _this;
    }
    return SatrtBuckFlowerCoffeFcatory;
}(FlowerCoffe));
;
var LuckinFlowerCoffeFcatory = /** @class */ (function (_super) {
    __extends(LuckinFlowerCoffeFcatory, _super);
    function LuckinFlowerCoffeFcatory() {
        var _this = _super.call(this) || this;
        console.log(' 具体产品工厂--LuckinFlower');
        return _this;
    }
    return LuckinFlowerCoffeFcatory;
}(FlowerCoffe));
;
//抽象族工厂基类
var ShopFactory = /** @class */ (function () {
    function ShopFactory() {
        console.log('我是抽象族工厂基类');
    }
    return ShopFactory;
}());
//具体族工厂
var StartBuckFactory = /** @class */ (function (_super) {
    __extends(StartBuckFactory, _super);
    function StartBuckFactory() {
        return _super.call(this) || this;
    }
    ;
    StartBuckFactory.prototype.createAmriCoffe = function () {
        return new SatrtBuckAmriCoffeFcatory();
    };
    ;
    StartBuckFactory.prototype.createLatteCoffe = function () {
        return new SatrtBuckLatteCoffeFcatory();
    };
    ;
    StartBuckFactory.prototype.createFlowerCoffe = function () {
        return new SatrtBuckFlowerCoffeFcatory();
    };
    return StartBuckFactory;
}(ShopFactory));
;
var LuckinFactory = /** @class */ (function (_super) {
    __extends(LuckinFactory, _super);
    function LuckinFactory() {
        return _super.call(this) || this;
    }
    ;
    LuckinFactory.prototype.createAmriCoffe = function () {
        return new LuckinAmriCoffeFcatory();
    };
    ;
    LuckinFactory.prototype.createLatteCoffe = function () {
        return new LuckinLatteCoffeFcatory();
    };
    ;
    LuckinFactory.prototype.createFlowerCoffe = function () {
        return new LuckinFlowerCoffeFcatory();
    };
    return LuckinFactory;
}(ShopFactory));
;
//创建一个Luckin美式咖啡
var res1 = new LuckinFactory().createAmriCoffe();
console.log(res1);
//创建一个Luckin美式咖啡
var res2 = new StartBuckFactory().createLatteCoffe();
console.log(res2);
